package com.leet.code.simple_array;

/**
 * @description:
 * @author: WYG
 * @time: 2020/11/26 19:16
 */

public class IsToeplitzMatrix {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5; j++) {
                System.out.print(i+""+j+" ");
            }
            System.out.println();
        }
    }
    public boolean isToeplitzMatrix(int[][] matrix) {
        int row = matrix.length;
        int col = matrix[0].length;
        for (int i = 0; i < row - 1; i++) {
            for (int j = 0; j < col - 1; j++) {
                if (matrix[i][j] != matrix[i + 1][j + 1]) return false;
            }
        }
        return true;
    }
}
